package com.example.myapplication.ui.activity.setting

import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
import com.example.myapplication.request.LoginRequest
import kotlinx.coroutines.launch

/**
 *设置的viewModel
 *
 * @author : Kun
 * @date : 2021/6/7
 * @time : 15:43
 */
class SettingViewModel : ViewModel() {
    /**
     * 登录相关的request
     */
    val loginRequest = LoginRequest()

    /**
     * 退出登录
     */
    fun requestLogout(){
        viewModelScope.launch {
            loginRequest.requestLogout()
        }
    }
}